<%--
  Created by IntelliJ IDEA.
  User: lanou
  Date: 18/1/30
  Time: 上午11:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="p" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>游戏道具管理</title>
</head>
<body>
    <div>
        <form action="/manage" method="post">
            查询游戏道具：<input type="text" name="manage" id="manage"><br>
            <input type="submit" value="查询" id="button">
        </form>
    </div>
    <div>
        <ul id="ruit">
        <p:forEach var="s" items="${sessionScope.shops}">
            <li>${s.dname} &nbsp; ${s.dabout}
                <a href="/manage?id=${s.id}&manage=${sessionScope.get('name')}">删除</a></li>

        </p:forEach>

        </ul>
     <a href="/manage?step=up&manage=${sessionScope.get('name')}&page=${sessionScope.page}">&laquo;</a>

        <p:forEach var="i" items="${sessionScope.num}">

          <a href="/manage?pageA=${i}&page=${page}&manage=${sessionScope.get('name')}">${i}</a>

        </p:forEach>
        <a href="/manage?step=down&manage=${sessionScope.get('name')}&page=${sessionScope.page}">&raquo;</a>
    </div>

    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script>
//        $(function () {
//            $("#button").on("click",function () {
//                var name = $("#manage").val();
//                $.ajax({
//                    type:'post',
//                    data:{name:name},
//                    url:'manage',
//                    success:function (data) {
//                        for(i=0;i<data.length;i++){
//                            $("#ruit").append("<li>data[i].dname&nbsp;data[i].dabout</li>")
//                        }
//                    }
//
//                })
//            })
//        })


    </script>
</body>
</html>
